package com.honghea.rxhttp;

import com.honghea.rxhttp.factory.IRetrofitFactory;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;


public class DefaultRetrofitFactory implements IRetrofitFactory {
    @Override
    public Retrofit provide(OkHttpClient client, String baseUrl) {
        return new Retrofit.Builder()
                .client(client)
                .addCallAdapterFactory(RxJava3CallAdapterFactory.create())
                .baseUrl(baseUrl)
                .build();
    }
}
